package com.sen.rbac.feign;

import com.sen.common.common.bo.SysResourceBO;
import com.sen.common.common.response.MessageResult;
import com.sen.rbac.feign.fallback.RbacResourceFeignFallbackFactory;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

/**
 * @author esjiang
 */
@FeignClient(name = "linsir-sen-rbac",fallbackFactory = RbacResourceFeignFallbackFactory.class)
public interface RbacResourceFeign {

    /**
     * 根据账户名查询权限
     * @param userName 账户名
     * @return
     */
    @GetMapping(value = "/resource/findResourceByUserNameForGateway")
    MessageResult<List<SysResourceBO>> findResourceByUserNameForGateway(@RequestParam("userName") String userName);
}
